Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

how do I use < or > in a custom character sheet

i m trying to use &lt;/&gt; in a custom character sheet but i get an error message and i have no idea if i need a special command or it is another problem.
1589146973

Edited 1589146999
Can you give some more details about your use case and what you are trying to accomplish? Do you want to use the mathematical symbol or the angle brackets? Are you talking about in the HTML of the sheet or would users enter these symbols in fields on the sheet? Also, what does the error message say?
1589193031
Ziechael
Forum Champion
Sheet Author
API Scripter
As Rabulias says, we'll need to see your current code in order to make suggestions/offer solutions. A snippet will do, enough to get the context :)
I try to modify a existing sheet for my needs (Unofficial Elder Scrolls RPG) so that when my player is rolling a d100 and is testing if the rolled number is under a threshold for a success. &nbsp;The Code: &lt;td&gt;&lt;button type="roll" value="&amp;{template:basic} {{name="Skillname" }} {{rng_attack=}} {{damage=}}&nbsp; {{spell_description=[[(1d100cs@{lucky0}cs@{lucky1}cs@{lucky2}cs@{lucky3}cs@{lucky4}cs@{lucky5}cf@{unlucky0}cf@{unlucky1}cf@{unlucky2}cf@{unlucky3}cf@{unlucky4}cf@{unlucky5} &lt; (@{acro}+@{attrb})) ]] }}"/&gt;&lt;/td&gt;&nbsp; i only changed the last part the rest was from the original.
1589226698
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You need to have the target value fully resolved by the time the comparison happens. This means that you need to wrap the target value in inline roll brackets. Try this: [[1d100cs@{lucky0}cs@{lucky1}cs@{lucky2}cs@{lucky3}cs@{lucky4}cs@{lucky5}cf@{unlucky0}cf@{unlucky1}cf@{unlucky2}cf@{unlucky3}cf@{unlucky4}cf@{unlucky5} &lt;[[ @{acro}+@{attrb}]] ]]
1589233875

Edited 1589233890
Kraynic
Pro
Sheet Author
I think that would have to be done for all the lucky and unlucky attribute calls as well: ...cs[[@{lucky0}]]cs[[@{lucky1}]]cs...
1589238530
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
depends on what those attributes resolve to. If all they ever resolve to is a single number, then you're good. If they can contain math though, then yes, you'll need the inline rolls. And wrapping them in inline rolls is probably just the safer, better practice.
1589239112
GiGs
Pro
Sheet Author
API Scripter
Also, wrapping things like that inline rolls makes for easier reading, when you're looking at the past roll. Judicious use of inline roll brackets, even when they are not needed, is a small quality of life improvement.
okay thanks its now working, maybe as a follow-up question i get now a binary(1/0) results there possibility to also show the rolled result?
1589301093

Edited 1589345362
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Unfortunately, the success/failure syntax only shows a 0 or 1. However, as you are making a custom sheet, you could use a roll template to replicate the comparison and show the result. Something like the following roll template (away from my computer atm for a tornado warning, so this is untested): &lt;rolltemplate class="sheet-rolltemplate-comparer"&gt; &nbsp;&nbsp;&nbsp;&nbsp;{{d100}}{{#rollGreater() d100 target}}Failure{{/rollGreater() d100 target}}{{#^rollGreater() d100 target}}Success{{/^rollGreater() d100 target}} &lt;/rolltemplate&gt; To use this, you'd have a d100 field that stores the roll, and a target field that stores the target number. The macro would look like: &amp;{template:comparer} {{d100=[[1d100cs@{lucky0}cs@{lucky1}cs@{lucky2}cs@{lucky3}cs@{lucky4}cs@{lucky5}cf@{unlucky0}cf@{unlucky1}cf@{unlucky2}cf@{unlucky3}cf@{unlucky4}cf@{unlucky5} ]]}} {{target= [[ @{acro}+@{attrb}]]}} Edited to correct a typo in the template html.
cool thank you very much&nbsp;
ohh i just read that with the tornado warning i hope everything is okay O.o
1589308106
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, all good, I'm out of the bathroom now and just listening to the rain pour down.
okay that is good to hear and still a disturbing thought that people need to hide from things like this from an European perspective. a question to the code i tried it and i was able to roll but it was not able to check the target number.&nbsp;
1589345273

Edited 1589345380
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, that's my bad. I forgot to put the parentheses for the function calls in there. See the wiki for full details I've edited the post to be correct.
Thanks&nbsp;
i have another question for another theme so maybe i need a new forum post but i´m not sure, so i will try it here first. XD in this template can i excess the same roll 2 times, so that is shows one time the normal roll and as example in another row the same roll /10 ?
1589413340
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
No, rolls can't be reused that way.